﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using CS.BLL;
using CS.Model;

namespace CaterSystem
{
    public partial class Login : Form
    {
        public Login()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            LoginBLL lb=new LoginBLL();
            LoginModel lm = new LoginModel()
            {
                LoginModelName = textBox1.Text.Trim(),
                LoginModePwd = textBox2.Text.Trim()
            };
            if (lb.IsExist(lm))
            {
                this.DialogResult=DialogResult.OK;
               // MessageBox.Show("Ok");
            }
            else
            {
                MessageBox.Show("Fail");
            }

        }
    }
}
